Re: Which is better (more columns or rows) ?

Поиск
Список
Период
Сортировка
От Steve Leibel
Тема Re: Which is better (more columns or rows) ?
Дата
Msg-id v04210108b6f810a44a56@[24.168.26.251]
обсуждение исходный текст
Ответ на Which is better (more columns or rows) ?  (thomas wong <twong@aamsin.com>)
Список pgsql-general
At 9:16 AM +0800 4/10/01, thomas wong wrote:
>Hi,
> I have recently tried some simple test on the postgresql 7.0
>running on a PIII 600MHz, 128 Mbytes RAM . I created a simple Visual
>Basic app that query two tables.
>The first one consist of 10 columns  and the other 30 columns. I
>inserted about 250,000 records into each tables and then do a
>"vacuum" on the database.
>Next I query to select about 100,000 records. I repeated this query
>for 5 times and each time I will do a "vacuum".
>Below is the average timing I get:-
>For 10 columns table ~109s
>For 30 columns table ~ 112s
>
>Is it true that I can design database tables to have more columns
>without performance degradation during query ?


If your data is such that you can just put everything in one table
with lots of columns, you're better off with a flatfile database.

The whole point of relational databases is the flexibility you get
from having normalized data, which in general means more tables with
fewer columns in each.


В списке pgsql-general по дате отправления:

Предыдущее
От: thomas wong
Дата:
Сообщение: Which is better (more columns or rows) ?
Следующее
От: "Charlie Derr"
Дата:
Сообщение: RE: JDBC and Perl compiling problems w/ postgresql-7.1rc4